home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / Make / source / remote-stub.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-22  |  2.8 KB  |  108 lines

  1. /* Template for the remote job exportation interface to GNU Make.
  2. Copyright (C) 1988, 1989, 1992, 1993, 1996 Free Software Foundation, Inc.
  3. This file is part of GNU Make.
  4.  
  5. GNU Make is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9.  
  10. GNU Make is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with GNU Make; see the file COPYING.  If not, write to
  17. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. #include "make.h"
  20. #include "filedef.h"
  21. #include "job.h"
  22. #include "commands.h"
  23.  
  24.  
  25. char *remote_description = 0;
  26.  
  27. /* Call once at startup even if no commands are run.  */
  28.  
  29. void
  30. remote_setup ()
  31. {
  32. }
  33.  
  34. /* Called before exit.  */
  35.  
  36. void
  37. remote_cleanup ()
  38. {
  39. }
  40.  
  41. /* Return nonzero if the next job should be done remotely.  */
  42.  
  43. int
  44. start_remote_job_p ()
  45. {
  46.   return 0;
  47. }
  48.  
  49. /* Start a remote job running the command in ARGV,
  50.    with environment from ENVP.  It gets standard input from STDIN_FD.  On
  51.    failure, return nonzero.  On success, return zero, and set *USED_STDIN
  52.    to nonzero if it will actually use STDIN_FD, zero if not, set *ID_PTR to
  53.    a unique identification, and set *IS_REMOTE to zero if the job is local,
  54.    nonzero if it is remote (meaning *ID_PTR is a process ID).  */
  55.  
  56. int
  57. start_remote_job (argv, envp, stdin_fd, is_remote, id_ptr, used_stdin)
  58.      char **argv, **envp;
  59.      int stdin_fd;
  60.      int *is_remote;
  61.      int *id_ptr;
  62.      int *used_stdin;
  63. {
  64.   return -1;
  65. }
  66.  
  67. /* Get the status of a dead remote child.  Block waiting for one to die
  68.    if BLOCK is nonzero.  Set *EXIT_CODE_PTR to the exit status, *SIGNAL_PTR
  69.    to the termination signal or zero if it exited normally, and *COREDUMP_PTR
  70.    nonzero if it dumped core.  Return the ID of the child that died,
  71.    0 if we would have to block and !BLOCK, or < 0 if there were none.  */
  72.  
  73. int
  74. remote_status (exit_code_ptr, signal_ptr, coredump_ptr, block)
  75.      int *exit_code_ptr, *signal_ptr, *coredump_ptr;
  76.      int block;
  77. {
  78.   errno = ECHILD;
  79.   return -1;
  80. }
  81.  
  82. /* Block asynchronous notification of remote child death.
  83.    If this notification is done by raising the child termination
  84.    signal, do not block that signal.  */
  85. void
  86. block_remote_children ()
  87. {
  88.   return;
  89. }
  90.  
  91. /* Restore asynchronous notification of remote child death.
  92.    If this is done by raising the child termination signal,
  93.    do not unblock that signal.  */
  94. void
  95. unblock_remote_children ()
  96. {
  97.   return;
  98. }
  99.  
  100. /* Send signal SIG to child ID.  Return 0 if successful, -1 if not.  */
  101. int
  102. remote_kill (id, sig)
  103.      int id;
  104.      int sig;
  105. {
  106.   return -1;
  107. }
  108.